package com.prs.crm.domain.archives;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * 
 * @author Yanghao
 *	2012-7-11 15:32:08 档案管理
 */
@Entity
@Table(name="ar_archivesmanager")
public class ArchivesManager extends BaseEntity{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	private String number;
	private String archivesName;
	private String adress;
	private int page;
	@Lob
	private String text;
	@ManyToOne
	private ArchivesType archivesType;
	@ManyToOne
	private KeepTime keepTime;
	@ManyToOne
	private SecretLevel secretLevel;
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade(CascadeType.REFRESH)
	private Attachment attach;
	private Integer state;
	private Integer mark;
	//关联信息
	private String degree;  //重要程度
	private Date sendTime;  //发送时间
	@ManyToOne
	private Person sendPerson;  //发送者
	
	private String receivePerson;  //接收者
	@Lob
	private String content;  //内容

	public String getDegree() {
		return degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public Person getSendPerson() {
		return sendPerson;
	}

	public void setSendPerson(Person sendPerson) {
		this.sendPerson = sendPerson;
	}

	public String getReceivePerson() {
		return receivePerson;
	}

	public void setReceivePerson(String receivePerson) {
		this.receivePerson = receivePerson;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getMark() {
		return mark;
	}

	public void setMark(Integer mark) {
		this.mark = mark;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getArchivesName() {
		return archivesName;
	}

	public void setArchivesName(String archivesName) {
		this.archivesName = archivesName;
	}

	public String getAdress() {
		return adress;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}
	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public ArchivesType getArchivesType() {
		return archivesType;
	}

	public void setArchivesType(ArchivesType archivesType) {
		this.archivesType = archivesType;
	}

	public KeepTime getKeepTime() {
		return keepTime;
	}

	public void setKeepTime(KeepTime keepTime) {
		this.keepTime = keepTime;
	}

	public SecretLevel getSecretLevel() {
		return secretLevel;
	}

	public void setSecretLevel(SecretLevel secretLevel) {
		this.secretLevel = secretLevel;
	}

	public Attachment getAttach() {
		return attach;
	}

	public void setAttach(Attachment attach) {
		this.attach = attach;
	} 
}
